package com.mmd.admin.model.pojo.request;

import com.mmd.base.annotation.valid.group.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
@ApiModel("商家保证金添加编辑参数")
public class CrmEarnestMoneyRuleAddOrEditParam {

    @ApiModelProperty("id")
    private Long id=0L;

    @ApiModelProperty(value = "最低销量")
    @NotNull(message = "最低销量不能为空",groups = {ValidGroup.Insert.class,ValidGroup.Update.class})
    private Integer minNumber;

    @ApiModelProperty(value = "金额")
    @DecimalMin(value = "1",message = "金额最低1",groups = {ValidGroup.Insert.class,ValidGroup.Update.class})
    @NotNull(message = "金额不能为空",groups = {ValidGroup.Insert.class,ValidGroup.Update.class})
    private BigDecimal money;

    @ApiModelProperty(value = "最高销量")
    @NotNull(message = "最高销量不能为空",groups = {ValidGroup.Insert.class,ValidGroup.Update.class})
    private Integer maxNumber;
}
